using System;
using System.ComponentModel.DataAnnotations;
using Abp.Domain.Entities;
using Abp.Domain.Entities.Auditing;

namespace Yozeev.BusinessLogic
{
    /// <summary>
    /// 设备
    /// </summary>
    public class Device: ByBranchEntity<Guid>
    {
        /// <summary>
        /// 站点编号
        /// </summary>
        public string TicketStationId { get; set; }
        /// <summary>
        /// 设备代码
        /// </summary>
        [Required(ErrorMessage = "设备代码不能为空")]
        [StringLength(100)]
        public string DeviceCode { get; set; }
        /// <summary>
        /// 设备名称
        /// </summary>
        [Required(ErrorMessage = "设备名称不能为空")]
        [StringLength(500)]
        public string DeviceName { get; set; }
        /// <summary>
        /// IP地址
        /// </summary>
        public string IPAddress { get; set; }
        /// <summary>
        /// 端口
        /// </summary>
        public string Port { get; set; }
        /// <summary>
        /// 设备分类
        /// </summary>
        [Required]
        public  DeviceTypeEnum DeviceType { get; set; }
        /// <summary>
        /// 备份秘钥
        /// </summary>
        public string SecretKey { get; set; }
        /// <summary>
        /// 状态
        /// </summary>
        [Required]
        public DeviceStatusEnum DeviceStatus { get; set; }
        /// <summary>
        /// 是否启用
        /// </summary>
        [Required(ErrorMessage = "是否启用不能为空")]
        public bool IsEnabled { get; set; }
    }
}
